
<template>
  <div>
    <vol-box
      :model.sync="model"
      :padding="30"
      title="应收帐户--详情"
      :width="950"
      :height="550"
    >
      <VolForm
        ref="myform"
        :loadKey="loadKey"
        :formFileds="formFileds"
        :formRules="formRules"
        :labelWidth="140"
      ></VolForm>
    </vol-box>
  </div>
</template>
<script>
export default {
  components: {
    VolBox: () => import("@/components/basic/VolBox.vue"),
    VolForm: () => import("@/components/basic/VolForm.vue"),
  },
  data() {
    return {
      loadKey: true,
      model: false,
      formFileds: {
        modifier: "", //修改人
        modifyDate: "", //修改时间（后端生成）
        modifyID: "", //修改人ID（拿不到）
        createDate: "", //创建时间（后端生成）
        createID: "", //创建人ID（拿不到）
        creator: "", //创建人
        is_delete: "", //逻辑删除标志（没有用）
        account_code_fk: "", //应收账户编号（后端生成）
        account_name: "", //应收账户名称
        is_entryaccount: 1, //是否入账
        is_credit: 0, //是否授信
        credit_total: "", //授信额度
        account_limit: "", //单笔挂账限额
        warn_phone: "", //警告手机
        warn_limit: "", //警告限额
        temporary_limit: "", //临时限额
        is_valid: 1, //是否有效
        is_autostop: 0, //是否自动停用
        date: [], //时间区间 （中专有效期）
        effec_enddate: "", //有效期，结束时间
        effec_startdate: "", //有效期，开始时间
        contact: "", //联系人
        contact_phone: "", //联系人电话
        finance_notes: "", //财务备注
        notes: "", //备注
        account_alias: "", //应收账户编号
        is_warn: 0, //是否警告（前端自己判断）
      },
      formRules: [
        // [{"title":"修改人","field":"modifier"},
        //            {"title":"修改时间","field":"modifyDate"},
        //            {"title":"修改人ID","field":"modifyID","type":"number"},
        //            {"title":"创建时间","field":"createDate"},
        //            {"title":"创建人ID","field":"createID","type":"number"},
        //            {"title":"创建人","field":"creator"},
        //            {"title":"逻辑删除标志","field":"is_delete","type":"number"},
        //            {"title":"应收账户编号","required":true,"field":"account_code_fk","disabled":true}],
        [
          {
            title: "应收账户名称",
            required: true,
            field: "account_name",
            type: "text",
            colSize: 6,
            disabled: true,
          },
          {
            title: "应收账户编号",
            required: true,
            field: "account_alias",
            type: "text",
            colSize: 5,
            disabled: true,
          },
        ],
        [
          {
            title: "联系人",
            required: true,
            field: "contact",
            type: "text",
            colSize: 6,
            disabled: true,
          },
          {
            title: "联系人电话",
            required: true,
            field: "contact_phone",
            type: "phone",
            colSize: 6,
            disabled: true,
          },
        ],
        [
          {
            disabled: true,
            title: "有效期",
            // range: true,
            required: true,
            field: "date",
            type: "text",
            colSize: 6,
          },
          // {
          //   title: "有效期终止",
          //   required: true,
          //   field: "effec_enddate",
          //   type: "date",
          // },
        ],
        [
          {
            title: "是否授信",
            required: true,
            field: "is_credit",
            type: "switch",
            colSize: 6,
            disabled: true,
          },
          {
            title: "授信额度",
            required: true,
            field: "credit_total",
            type: "decimal",
            disabled: true,
            colSize: 6,
          },
        ],
        [
          {
            title: "是否允许入账",
            required: true,
            field: "is_entryaccount",
            type: "switch",
            colSize: 6,
            disabled: true,
          },
          {
            title: "是否有效",
            required: true,
            field: "is_valid",
            type: "switch",
            colSize: 6,
            disabled: true,
          },
        ],
        [
          {
            title: "单笔限额",
            required: true,
            field: "account_limit",
            colSize: 6,
            type: "ZDecimal",
            disabled: true,
          },
          {
            title: "保留额度",
            required: true,
            field: "temporary_limit",
            colSize: 6,
            type: "ZDecimal",
            disabled: true,
          },
        ],
        [
          {
            title: "是否警告",
            required: true,
            field: "is_warn", //需修改
            type: "switch",
            colSize: 6,
            disabled: true,
          },
          {
            title: "警告限额",
            required: true,
            field: "warn_limit",
            type: "decimal",
            disabled: true,
            colSize: 6,
          },
        ],
        [
          {
            title: "警告手机",
            required: true,
            field: "warn_phone",
            type: "phone",
            disabled: true,
            colSize: 6,
          },
          {
            title: "是否自动停用",
            required: true,
            field: "is_autostop",
            type: "switch",
            colSize: 6,
            disabled: true,
          },
        ],

        // [
        //   {
        //     title: "财务备注",//去掉
        //     required: true,
        //     field: "finance_notes",
        //     colSize: 12,
        //     type: "textarea",
        //   },
        // ],
        [
          {
            title: "备注",
            required: true,
            field: "notes",
            colSize: 12,
            type: "textarea",
            disabled: true,
          },
        ],
      ],
    };
  },
  methods: {
    open() {
      this.model = true;
      console.log("www", this.formFileds);
    },
  },
};
</script>
